﻿@model PrivateMessageModel
@using Nop.Web.Models.PrivateMessages;
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";

    Html.AddTitleParts(T("PageTitle.ViewPM").Text);
}
<div class="page private-message-view-page">
    <div class="page-title">
        @T("PrivateMessages.View.ViewMessage")
    </div>
    <div class="page-body">
        <table class="view-message">
            <tr>
                <td class="fieldname">
                    @T("PrivateMessages.View.From")
                </td>
                <td>
                    @Model.CustomerFromName
                </td>
            </tr>
            <tr>
                <td class="fieldname">
                    @T("PrivateMessages.View.To")
                </td>
                <td>
                    @Model.CustomerToName
                </td>
            </tr>
            <tr>
                <td class="fieldname">
                    @T("PrivateMessages.View.Subject")
                </td>
                <td>
                    @Model.Subject
                </td>
            </tr>
            <tr>
                <td class="fieldname">
                    @T("PrivateMessages.View.Message")
                </td>
                <td class="message">
                    @Html.Raw(Model.Message)
                </td>
            </tr>
            <tr>
                <td colspan="2" class="options">
                    <input type="button" class="button-1 reply-pm-button" value="@T("PrivateMessages.View.ReplyButton")" 
                        onclick="setLocation('@Url.RouteUrl("SendPMReply", new { toCustomerId = Model.FromCustomerId, replyToMessageId = Model.Id })')" />
                    <input type="button" class="button-2 delete-pm-button" value="@T("PrivateMessages.View.DeleteButton")" 
                        onclick="setLocation('@Url.RouteUrl("DeletePM", new { privateMessageId = Model.Id })')" />
                    <input type="button" class="button-2 back-pm-button" value="@T("PrivateMessages.View.BackButton")" 
                        onclick="setLocation('@Url.RouteUrl("PrivateMessages")')" />
                </td>
            </tr>
        </table>
    </div>
</div>
